package com.itheima.mybatis.framework;

import com.itheima.mybatis.dao.UserMapper;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author ：sean
 * @date ：Created in 2020/7/1
 * @description ：
 * @version: 1.0
 */

public class HmUserMapperFactoryBean implements FactoryBean {

	@Override
	public Class<?> getObjectType() {
		return UserMapper.class;
	}

	@Override
	public boolean isSingleton() {
		return false;
	}

	@Override
	public Object getObject() throws Exception {
		UserMapper userMapper = new DefaultHmSqlSession().getMapper(UserMapper.class);
		return userMapper;
	}
}
